package com.example.admin.model;

import com.example.admin.utils.CodeToNameUtil;
import org.springframework.util.StringUtils;

public class Student {

    private String custID;

    private String name;

    private String age;

    private String sex;

    private String sexName;

    private String adder;

    public String getCustID() {
        return custID;
    }

    public void setCustID(String custID) {
        this.custID = custID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        if (!StringUtils.isEmpty(age)) {
            age = age + "岁";
        }
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSexName() {
        sexName = CodeToNameUtil.sex.get(sex);
        return sexName;
    }

    public void setSexName(String sexName) {
        this.sexName = sexName;
    }

    public String getAdder() {
        return adder;
    }

    public void setAdder(String adder) {
        this.adder = adder;
    }


    @Override
    public String toString() {
        return "Student{" +
                "custID='" + custID + '\'' +
                ", name='" + name + '\'' +
                ", age='" + age + '\'' +
                ", sex='" + sex + '\'' +
                ", sexName='" + sexName + '\'' +
                ", adder='" + adder + '\'' +
                '}';
    }
}
